import setEditorDate from '@/pages/editor/setEditorDate';

// 跳转设计器
export const toEditor = (row: any) => {
  window.location.href = `/#/editor/${row.id}`;
  const {
    color = '白色',
    colorValue = `#ffffff`,
    designData = '{}',
    ppId,
    previewThumb = [],
    thumbs = [],
    printArea = 'front',
  } = row;
  setEditorDate(row.ppId, {
    color,
    colorValue,
    designData,
    ppId,
    previewThumb,
    thumbs,
    printArea,
    threadColor: '#ffffff'
  });
};
// 跳转商品详情
export const toGoodsDetail = (row: any) => {
  window.location.href = `/#/goods/${row.id}`;
};

// 跳转创作-产品详情
export const toProductDetail = (row: any) => {
  window.location.href = `/#/product/${row.id}`;
};
